<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>

<script src="${pageContext.request.contextPath}/resources/jquery/jquery-2.1.1.min.js"></script>
<head>
    <script type="text/javascript">
        //非动态显示
        //document.getElementById('time1').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());
        //动态显示时间
        setInterval("document.getElementById('time1').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());", 1000);
    </script>
    <style>
        #logoimg {
            width: 150px;
            position: absolute;
            left: 15px;
            padding: 5px 5px;
        }

        #logodiv {
            position: absolute;
            left: 165px;
        }

        #time1 {
            display: inherit;
        }
    </style>
</head>
<body>
<div class="container">
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <img id="logoimg" src="${pageContext.request.contextPath}/resources/img/logo2.png"/>
                <div id="logodiv"><a class="navbar-brand" href="${pageContext.request.contextPath}/index.jsp"
                                     style="font-size:32px;">在线报修平台</a></div>
            </div>
            <div id="navbar" class="navbar-collapse collapse" style="float:right;">
                <%--动态显示时间--%>
                <span id="time1"
                      style="color: #f7f7f9;float: left;font-family: 微软雅黑;font-weight: bold;padding-top: 5%"></span>
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <c:choose>
                            <c:when test="${account != null}">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i
                                    class="glyphicon glyphicon-user"></i> ${account}<span class="caret"></span></a>
                            </c:when>
                            <c:otherwise>
                                <a href="${pageContext.request.contextPath}/page/login-user.jsp">请登录</a>
                            </c:otherwise>
                        </c:choose>

                        <ul class="dropdown-menu" role="menu">
                            <li class="divider"></li>
                            <li><a href="${pageContext.request.contextPath}/user/quit"><i
                                class="glyphicon glyphicon-off"></i> 退出系统</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</div>
</body>
</html>
